package com.terren.spider.db.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.terren.spider.db.basic.BasicServiceSupportImpl;
import com.terren.spider.db.service.ZhihuUserService;
import com.terren.spider.entity.biz.ZhihuUser;

@Service("zhihuUserService")
public class ZhihuUserServiceImpl extends BasicServiceSupportImpl implements ZhihuUserService{
	private final String SQL_MAPPER = "zhihuUserMapper.";
	
	@Override
	public void save(List<ZhihuUser> items) throws Exception {
		basicDao.save(SQL_MAPPER+"addZhihuUser", items);
	}

	/*@Override
	public void updateDoneStatus(List<ZhihuUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateDoneStatus", users);
		
	}

	@Override
	public void updateFetchtimes(List<ZhihuUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateFetchtimes", users);
		
	}
	@Override
	public void updateProgressStatus(List<ZhihuUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateProgressStatus", users);
	}*/
	
	@Override
	public List<ZhihuUser> getUsers(ZhihuUser param) throws Exception {
		return basicDao.findForList(SQL_MAPPER + "getUsers", param);
	}

	@Override
	public void saveUserInfos(List<ZhihuUser> items) throws Exception {
		basicDao.save(SQL_MAPPER+"addZhihuUserInfos", items);
	}
}
